package com.zhongyu.user.provider.apiimpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhongyu.comm.api.LinkUserApi;
import com.zhongyu.comm.pojo.LinkUser;
import com.zhongyu.user.provider.mapper.LinkUserMapper;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class LinkUserApiimpl implements LinkUserApi {

    @Resource
    private LinkUserMapper linkUserMapper;
    @Override
    public List<LinkUser> findLinkUser(Integer userId) {
        QueryWrapper<LinkUser> queryWrapper= Wrappers.query();
        queryWrapper.eq("user_id",userId);
        return linkUserMapper.selectList(queryWrapper);
    }
}
